<template>
  <view :class="renderCls">
    <span v-html="message.messageInfo.body.text" ></span>
  </view>
</template>

<script>

export default {
  props: ['message', 'belong'],
  computed: {
	  renderCls() {
	    return this.belong == 'user'? 'text text_user' : 'text text_to';
	  },
  },
  methods: {
  }
};
</script>
<style lang="scss" scoped>
.text {
  font-size: 14px;
  white-space: pre-line;
  border-radius: 4px;
  padding: 10px 14px;
  word-break: break-all;
}
.text_user {
  background: #1bbf75;
  color: #fff;
  text-align: left;
}
.text_to {
  background: #fff;
  border-radius: 4px;
  color: #2c3e50;
  border: 1px solid #ebebeb;
  text-align: left;
}
</style>
